/**
 * Project Name:dsrs-businessservice-domain
 * File Name:FtpSettingCreateForm.java
 * Package Name:com.bwda.dsrs.businessservice.domain.form.ftpsetting;
 * Date:2019年4月28日
 * Copyright (c) 2019, 江苏保旺达软件有限公司 All Rights Reserved.
 *
 */
package com.bwda.dsrs.filecenter.domain.form.ftpsetting;

import java.math.BigDecimal;
import com.bwda.dsrs.base.util.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.*;

/**
 * FTP配置
 *
 * @author liangjianyong
 * @date 2019/4/27
 */
@Data
@ApiModel(description = "FTP配置")
public class FtpSettingCreateForm {

	@ApiModelProperty(value = "ID")
	private Integer id;

	@ApiModelProperty(value = "名称")
	@Size(max = 20,min = 1,message = "FTP名称长度在1-20之间")
	private String name;

	@ApiModelProperty(value = "0内部1外接")
	private Integer isOutFtp;

	@ApiModelProperty(value = "0主FTP,1备FTP")
	private Integer isMainFtp;

	@ApiModelProperty(value = "主ID")
	private Long mainId;

	@ApiModelProperty(value = "IP地址")
	@NotNull(message = "IP地址不能为空")
	private String ipAddr;

	@ApiModelProperty(value = "端口号")
	@NotNull(message = "端口号不能为空")
	@Min(value = 0,message ="端口范围在1-100000")
	@Max(value = 100000,message ="端口范围在1-100000")
	private Integer port;

	@ApiModelProperty(value = "0:ftp 1:sftp")
	@NotNull(message = "请选择FTP类型")
	private Integer ftpType;

	@ApiModelProperty(value = "用户名")
	@NotNull(message = "用户名不能为空")
	@Size(max = 20,min = 1,message = "用户名长度1-20")
	private String userCode;

	@ApiModelProperty(value = "密码")
	@NotNull(message = "密码不能为空")
	private String password;

	@ApiModelProperty(value = "模式")
	private Integer ftpMode;

	@ApiModelProperty(value = "语言编码")
	private String unicode;

	@ApiModelProperty(value = "备注")
	@Size(min = 0,max = 140,message = "备注长度在1-140之间")
	private String remark;

	@ApiModelProperty(value = "硬盘可用总空间")
	@Digits(integer = 7,fraction = 2,message = "硬盘可用总空间应在1-100000之间")
	private BigDecimal diskSize;

	@ApiModelProperty(value = "已用硬盘空间")
	@Digits(integer = 7,fraction = 2,message = "已用硬盘空间应在1-100000之间")
	private BigDecimal usedDiskSize;

	@ApiModelProperty(value = "0正常 1不启用")
	private Integer status;

	@ApiModelProperty(value = "优先级排序")
	private Integer orderNum;

	@ApiModelProperty(value = "0 不共享 1共享")
	private Integer isShare;

	@ApiModelProperty(value = "创建时间,格式为:" + DateUtil.FORMAT)
	@DateTimeFormat(pattern = DateUtil.FORMAT)
	private Date createTime;
	@ApiModelProperty(value = "0未删除 1已删除")
	private Integer delFlag;

	@ApiModelProperty(value = "是否自动同步  0不同步 1同步")
	private Integer issync;

	@ApiModelProperty(value = "同步方式  1 直接同步 2主从账号")
	private Integer syncType;
}